home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsICRLManager.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  111 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is mozilla.org code.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications Corporation.
  20.  * Portions created by the Initial Developer are Copyright (C) 1998
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  27.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #include "nsISupports.idl"
  40.  
  41. interface nsIURI;
  42. interface nsIArray;
  43. interface nsICRLInfo;
  44.  
  45. %{C++
  46. #define NS_CRLMANAGER_CID { /* 5b256c10-22d8-4109-af92-1253035e9fcb */ \
  47.     0x5b256c10, \
  48.     0x22d8, \
  49.     0x4109, \
  50.     {0xaf, 0x92, 0x12, 0x53, 0x03, 0x5e, 0x9f, 0xcb} \
  51.   }
  52.  
  53. #define NS_CRLMANAGER_CONTRACTID "@mozilla.org/security/crlmanager;1"
  54. %}
  55.  
  56.  
  57.  
  58. [scriptable, uuid(486755db-627a-4678-a21b-f6a63bb9c56a)]
  59. interface nsICRLManager : nsISupports {
  60.   /*
  61.    * importCrl
  62.    *
  63.    * Import a CRL into the certificate database.
  64.    */
  65.   void importCrl([array, size_is(length)] in octet data,
  66.                  in unsigned long length,
  67.                  in nsIURI uri,
  68.                  in unsigned long type,
  69.                  in boolean doSilentDownload,
  70.                  in wstring crlKey);
  71.  
  72.   
  73.   /*
  74.    * update crl from url
  75.    * update an existing crl from the last fetched url. Needed for the update
  76.    * button in crl manager
  77.    */
  78.   boolean updateCRLFromURL(in wstring url, in wstring key);
  79.  
  80.  
  81.   /*
  82.    * getCrls
  83.    *
  84.    * Get a list of Crl entries in the DB.
  85.    */
  86.   nsIArray getCrls();
  87.  
  88.   /*
  89.    * deleteCrl
  90.    *
  91.    * Delete the crl.
  92.    */
  93.   void deleteCrl(in unsigned long crlIndex);
  94.  
  95.  
  96.   /* This would reschedule the autoupdate of crls with auto update enable.
  97.    * Most likely to be called when update prefs are changed, or when a crl
  98.    * is deleted, etc. However, this might not be the most relevant place for
  99.    * this api, but unless we have a separate crl handler object....
  100.    */
  101.   void rescheduleCRLAutoUpdate();
  102.  
  103.  
  104.   const unsigned long TYPE_AUTOUPDATE_TIME_BASED     = 1;
  105.   const unsigned long TYPE_AUTOUPDATE_FREQ_BASED     = 2;
  106.  
  107.   wstring computeNextAutoUpdateTime(in nsICRLInfo info,
  108.                                     in unsigned long autoUpdateType,
  109.                                     in double noOfDays);
  110. };
  111.